Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new BitSelectField<T> form component to BitBlazor (with option and option-group child components), plus tests, Storybook stories, and documentation to support and demonstrate the new select field.
Changes:
- Introduces
BitSelectField<T>,BitSelectItem<TValue>, andBitSelectItemGroup(plus an internal marker interface for cascading/type-safety). - Adds rendering tests and Storybook stories for default/disabled/grouped scenarios.
- Updates docs and a few infrastructure items (base validation logic, Storybook package versions, solution metadata).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
src/BitBlazor/Form/SelectField/BitSelectField.razor |
Implements the select field markup using InputSelect and cascades the parent to child option components. |
src/BitBlazor/Form/SelectField/BitSelectField.razor.cs |
Adds the select field component class and container CSS composition. |
src/BitBlazor/Form/SelectField/BitSelectItem.razor |
Renders an <option> for use inside BitSelectField. |
src/BitBlazor/Form/SelectField/BitSelectItem.razor.cs |
Defines option parameters (value/disabled/attributes). |
src/BitBlazor/Form/SelectField/BitSelectItemGroup.razor |
Renders an <optgroup> for grouping select options. |
src/BitBlazor/Form/SelectField/BitSelectItemGroup.razor.cs |
Defines optgroup parameters (label/disabled/attributes). |
src/BitBlazor/Form/SelectField/IBitSelectField.cs |
Adds internal marker interface for cascading/typing. |
src/BitBlazor/Form/BitFormComponentBase.cs |
Adjusts supported-type validation to allow “no restriction” (empty SupportedTypes). |
src/BitBlazor/Core/BitComponentBase.cs |
Minor documentation formatting update. |
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor |
Adds rendering tests for BitSelectField scenarios. |
tests/BitBlazor.Test/Components/Breadcrumb/BitBreadcrumbTest.Rendering.razor |
Aligns test base inheritance (BunitContext). |
stories/BitBlazor.Stories/Components/Stories/Form/BitSelectField.stories.razor |
Adds Storybook stories demonstrating the new component. |
stories/BitBlazor.Stories/BitBlazor.Stories.csproj |
Updates Storybook-related package versions. |
docs/form/select-field.md |
Adds dedicated documentation page for BitSelectField. |
docs/form/form-components.md |
Adds BitSelectField to the form components index and examples. |
docs/quick-reference.md |
Adds quick reference examples using BitSelectField. |
docs/README.md |
Adds BitSelectField to docs landing page list. |
BitBlazor.sln |
Updates solution metadata for newer Visual Studio version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor
Show resolved
Hide resolved
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor
Show resolved
Hide resolved
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor
Show resolved
Hide resolved
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor
Show resolved
Hide resolved
stories/BitBlazor.Stories/Components/Stories/Form/BitSelectField.stories.razor
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Contributor
Co-authored-by: albx <5121303+albx@users.noreply.github.com>
Co-authored-by: albx <5121303+albx@users.noreply.github.com>
…ntbase to bitinputfieldbase
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor
Show resolved
Hide resolved
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor
Show resolved
Hide resolved
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Co-authored-by: albx <5121303+albx@users.noreply.github.com>
…move unnecessary null-forgiving operators Co-authored-by: albx <5121303+albx@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new, fully-featured select field component (
BitSelectField) for forms in the BitBlazor library. The implementation includes support for grouped options, disabled states, custom option rendering, and additional accessibility and customization features. Comprehensive tests and Storybook stories are also added to demonstrate and verify the new component's behavior.New Select Field Component and Supporting Elements:
BitSelectField<T>component, which provides a customizable and accessible select field for forms, supporting templated options and option groups. (src/BitBlazor/Form/SelectField/BitSelectField.razor,src/BitBlazor/Form/SelectField/BitSelectField.razor.cs, src/BitBlazor/Form/SelectField/IBitSelectField.csR1-R11)BitSelectItem<TValue>andBitSelectItemGroupcomponents for defining selectable options and logically grouped options within the select field. (src/BitBlazor/Form/SelectField/BitSelectItem.razor,src/BitBlazor/Form/SelectField/BitSelectItem.razor.cs,src/BitBlazor/Form/SelectField/BitSelectItemGroup.razor,src/BitBlazor/Form/SelectField/BitSelectItemGroup.razor.cs)IBitSelectFieldfor internal type safety and cascading parameters.Testing and Documentation:
tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razor, tests/BitBlazor.Test/Form/SelectField/BitSelectFieldTest.Rendering.razorR1-R197)stories/BitBlazor.Stories/Components/Stories/Form/BitSelectField.stories.razor, stories/BitBlazor.Stories/Components/Stories/Form/BitSelectField.stories.razorR1-R77)Core and Infrastructure Improvements:
BitFormComponentBase<T>to allow components with emptySupportedTypesarrays.BitComponentBase.tests/BitBlazor.Test/Components/Breadcrumb/BitBreadcrumbTest.Rendering.razor, tests/BitBlazor.Test/Components/Breadcrumb/BitBreadcrumbTest.Rendering.razorL1-R1)